import Cookies from 'js-cookie'

const TokenKey = 'DDS-TOKEN'
const AdminRoles = 'AdminRoles'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token, { expires: 30 })
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
export function getAuth() {
  return Cookies.get(AdminRoles)
}
export function setAuth(roles) {
  return Cookies.set(AdminRoles, roles, { expires: 30 })
}
